import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;

public class tanxinSuanfa {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        Integer n = Integer.parseInt(sc.nextLine());
        int[] nums = new int[]{8,9,2,5,4,7,1};
        int x = maxProfit1(nums);
        System.out.println(x);
    }

    private static int maxProfit1(int[] nums) {
        return 0;
    }

    private static int maxProfit(int[] prices) {
        int sell = Integer.MAX_VALUE;
        int result = 0;
        for (int i = 0; i < prices.length; i++){
            if(sell > prices[i]){
                sell = prices[i];
            }else if(prices[i]-sell > result){
                result = prices[i]-sell;
            }
            System.out.println("sell = " + sell);
            System.out.println("bug = " + result);
        }
        return result;
    }
}
